﻿<%@ Page Title="Добавить новую статью" Language="C#" MasterPageFile="~/Content.Master" AutoEventWireup="true" CodeBehind="AddTopic.aspx.cs" Inherits="MusaDor.Publisher.AddTopic" ValidateRequest="False" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" src="../Scripts/tinymce/tinymce.min.js"></script>
    <link rel="stylesheet" href="../Scripts/chosen-master/chosen/chosen.css" />
    <script type="text/javascript" src="../Scripts/jquery-1.4.1.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
                <span>
                    Category:
                </span>
                <br />
                <asp:DropDownList ID="Categories" runat="server" 
                DataSourceID="CategoriesSqlDataSource" DataTextField="Title" 
                DataValueField="CategoryID" class="chzn-select" Width="338px">
                </asp:DropDownList>
                <script src="../Scripts/chosen-master/chosen/chosen.proto.js" type="text/javascript"></script>
                <br />
                <br />
                <span>
                    Title*:
                </span>
                <br />
                <asp:TextBox class="headerinput" ID="TextBoxTitle" MaxLength="256" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorTitle" runat="server" ErrorMessage="This field is required" ControlToValidate="TextBoxTitle" ForeColor="#FF3300" CssClass="Validation"></asp:RequiredFieldValidator>
                <br />
                <br />
                <span>
                    Subtitle:
                </span>
                <br />
                <asp:TextBox class="headerinput" ID="TextBoxSubtitle" MaxLength="256" runat="server"></asp:TextBox>
       			<br />
                <br />
                Image (miniature | 200x200 | .jpg)*:
                <asp:FileUpload ID="PreviewImageUpload" runat="server" CssClass="UploadPhoto"/>
                <asp:Label ID="PreviewImageUploadStatus" runat="server" Text=" "></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorPreviewImage" runat="server"  ErrorMessage="Select a miniature" ControlToValidate="PreviewImageUpload"  ForeColor="#FF3300"></asp:RequiredFieldValidator>                    
                <br />
                <br />
                Image (full | .jpg)*:
                <asp:FileUpload ID="FullImageUpload" runat="server" BackColor="White" CssClass="UploadPhoto"/>                        
                <asp:Label ID="FullImageUploadStatus" runat="server" Text=" " CssClass="Error"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorFullImage" runat="server" ErrorMessage="Select a full image" ControlToValidate="FullImageUpload" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                <br />                
                <br />
                Article*:
                <br />
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorArticle" runat="server" ErrorMessage="This field is required" ControlToValidate="Article" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                <script type="text/javascript">
                    tinymce.init({
                        selector: 'textarea',
                        theme: "modern"
                    }); 
                </script>
                <div class="ArticleContainer">
                    <asp:TextBox ID="Article" runat="server" TextMode="MultiLine" CssClass="Article"></asp:TextBox>            
                </div>
                <div class="bp">
                    <asp:Button ID="Send"   onclick="Send_Click"  runat="server" Text="Send"   CssClass="Send"/>            
                </div>                	
    <script src="../Scripts/chosen-master/chosen/chosen.proto.js" type="text/javascript"></script>
    <asp:SqlDataSource ID="CategoriesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [CategoryID], [Title] FROM [md_Categories] WHERE ([Type] = @Type)">
        <SelectParameters>
            <asp:Parameter DefaultValue="Article" Name="Type" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>       
</asp:Content>

